<!DOCTYPE html>
<html lang="zh">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
    <meta name="apple-mobile-web-app-capable" content="yes" />
    <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
    <title>其他监控 - 智慧粮仓</title>
    <link rel="stylesheet" href="../css/theme.css" />
    <link rel="stylesheet" href="../css/common.css" />
    <link rel="stylesheet" href="../css/iconfont.css" />
    <link rel="stylesheet" href="../css/iconfont.ttf" />
    <link rel="stylesheet" href="../layui-v2.8.17/layui/css/layui.css" />
    <!-- VConsole 初始化 -->
    <script src="../lib/vconsole/vconsole.min.js"></script>
    <script src="../js/vconsole-init.js"></script>
    <script src="../layui-v2.8.17/layui/layui.js"></script>
    <script src="../lib/jquery.js"></script>
    <script src="../lib/echarts.min.js"></script>
    <!-- 通用工具库 -->
    <script src="../lib/utils.js"></script>
    <script src="../js/common.js"></script>
    <script src="../js/widgets.js"></script>
    <script src="../js/warom-utils.js"></script>
    <script src="../js/android-interface.js"></script>
    <!-- 全局配置 -->
    <script src="../js/config.js"></script>
    <!-- 模拟数据 -->
    <script src="../js/mock/mock-other-data.js"></script>
    <!-- 页面特定脚本 -->
    <script src="../js/other.js"></script>

    <!-- 统一主题样式 -->
    <style>
      /* 全局样式 */
      * {
        margin: 0;
        padding: 0;
        box-sizing: border-box;
        font-family: "Roboto", "PingFang SC", "Microsoft YaHei", sans-serif;
      }
      
      body {
        background: linear-gradient(130deg, var(--theme-gradient-start) 0%, var(--theme-gradient-end) 100%);
        color: var(--theme-text-color);
        height: 100vh;
        width: 100vw;
        overflow: hidden;
      }
      
      /* 主要内容区域 */
      main {
        height: calc(100vh - 64px);
        padding: 16px;
        margin-top: 0;
        overflow-y: auto;
      }

      /* 卡片容器 */
      .card-container {
        display: flex;
        flex-wrap: wrap;
        gap: 20px;
        margin-bottom: 20px;
        justify-content: flex-start;
      }

      /* 卡片样式 */
      .monitoring-card {
        width: calc(33.33% - 20px);
        min-width: 320px;
        height: 300px; /* 增加高度以适应内容和固定按钮 */
        background: var(--theme-card-bg);
        border: 1px solid var(--theme-card-border);
        border-radius: 12px;
        padding: 20px;
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        box-shadow: var(--theme-card-shadow);
        transition: all 0.3s ease;
        margin-bottom: 10px;
        position: relative;
        display: flex;
        flex-direction: column;
      }
      
      .monitoring-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
      }

      /* 设备类型特定样式 */
      .pressure-card {
        border-left: 4px solid #2196F3;
      }
      
      .lighting-card {
        border-left: 4px solid #FFC107;
      }
      
      .fan-card {
        border-left: 4px solid #4CAF50;
      }

      /* 卡片内容区域 */
      .card-content {
        flex: 1;
        overflow: auto;
        margin-bottom: 50px; /* 为底部按钮留出空间 */
      }
      
      /* 没有控制按钮的卡片内容 */
      .fan-card .card-content {
        margin-bottom: 0; /* 移除底部空间 */
      }

      /* 卡片标题 */
      .card-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 16px;
        padding-bottom: 10px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
      }

      .card-title {
        font-size: 18px;
        font-weight: 600;
        color: var(--theme-text-color);
      }

      /* 状态指示器 */
      .status-indicator {
        display: flex;
        align-items: center;
      }

      .status-dot {
        width: 10px;
        height: 10px;
        border-radius: 50%;
        margin-right: 6px;
      }

      .status-on {
        background-color: #4CAF50;
      }

      .status-off {
        background-color: #F44336;
      }

      .status-normal {
        background-color: #4CAF50;
      }

      .status-warning {
        background-color: #FFC107;
      }

      .status-error {
        background-color: #F44336;
      }

      .status-text {
        font-size: 14px;
        color: rgba(255, 255, 255, 0.8);
      }

      /* 压力值显示 */
      .pressure-value {
        font-size: 32px;
        font-weight: bold;
        color: var(--theme-text-color);
        text-align: center;
        margin: 20px 0;
      }

      .pressure-unit {
        font-size: 16px;
        color: rgba(255, 255, 255, 0.7);
      }

      /* 可点击的开关状态 */
      .switch-status {
        display: flex;
        align-items: center;
        justify-content: space-between;
        cursor: pointer;
        transition: background-color 0.2s ease;
        border-radius: 6px;
        padding: 10px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
      }
      
      .switch-status:last-child {
        border-bottom: none;
      }
      
      .switch-status:hover {
        background-color: rgba(255, 255, 255, 0.1);
      }
      
      .switch-label {
        font-size: 16px;
        color: rgba(255, 255, 255, 0.9);
      }

      /* 控制按钮 */
      .control-buttons {
        display: flex;
        justify-content: center;
        gap: 12px;
        margin-top: auto;
        padding-top: 16px;
        padding-bottom: 8px;
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        background: var(--theme-card-bg);
        border-radius: 0 0 12px 12px;
        border-top: 1px solid rgba(255, 255, 255, 0.05);
      }

      .control-button {
        padding: 8px 20px;
        border-radius: 6px;
        border: none;
        background-color: rgba(255, 255, 255, 0.15);
        color: var(--theme-text-color);
        font-size: 14px;
        cursor: pointer;
        transition: background-color 0.2s ease;
      }

      .control-button:hover {
        background-color: rgba(255, 255, 255, 0.25);
      }

      .control-button.active {
        background-color: rgba(25, 118, 210, 0.6);
      }
      
      /* 属性状态样式 */
      .attribute-status {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 8px 10px;
        border-radius: 6px;
        margin-top: 4px;
        background-color: rgba(255, 255, 255, 0.05);
      }
      
      .attribute-label {
        font-size: 14px;
        color: rgba(255, 255, 255, 0.8);
      }
      
      .status-alarm {
        background-color: #F44336;
      }

      /* 响应式调整 */
      @media screen and (max-width: 768px) {
        .card-container {
          justify-content: center;
        }
        
        .monitoring-card {
          width: 100%;
          max-width: 350px;
        }
      }
    </style>
  </head>
  <body>
    <!-- 公共头部 -->
    <header class="common-header"></header>
    
    <main>
      <!-- 设备监控卡片容器 -->
      <div id="device-cards-container" class="card-container">
        <!-- 所有卡片将在这里动态生成 -->
      </div>
    </main>
  </body>
</html>
